<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>客户报表</title>
</head>
<body>
<div id="main" style="width: 600px;height:400px;"></div>
<script src="/js/plugins/echarts/echarts.common.min.js"></script>
<script type="text/javascript">
    var myChart = echarts.init(document.getElementById('main'));
    // 指定图表的配置项和数据
    var option = {
        title: {
            text: "潜在客户报表",
            x: 'center',
        },
        tooltip: {
            show: true
        },
        legend: {
            data: ['客户数'],
            x: 'left'
        },
        xAxis: [
            {
                type: 'category',
                data: ${groups}
            }
        ],
        yAxis: [
            {
                type: 'value'
            }
        ],
        series: [
            {
                "name": "客户数",
                "type": "bar",
                "data": ${num}
            }
        ]
    };
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>
</body>
</html>